<template>
  <div class="userIndex">
    <div class="divHead">
      <div class="divTitle">
        <ArrowLeft @click="router.back()" style="width: 5vw; height: 5vh;" />
        <span>个人中心</span>
      </div>

      <div class="divUser">
        <el-image style="width: 18vw; height: 18vw; margin-right: 5vw;" :src="require('@/assets/headPage.png')"
          fit="cover" />
        <div class="desc">
          <div class="divName">李测试</div>
          <div class="divPhone">13111111111</div>
        </div>
      </div>
    </div>

    <div class="divContent">
      <div class="divLinks">
        <div class="item" @click="addressClick">
          <img src="@/assets/locations.png" style="width: 20px; margin-right: 5px;">
          <span>地址管理</span>
          <ArrowRight style="width: 20px; position: absolute; right: 10px;" />
        </div>

        <div class="divSplit" />

        <div class="item">
          <img src="@/assets/orders.png" style="width: 20px; margin-right: 5px;">
          <span>历史订单</span>
          <ArrowRight style="width: 20px; position: absolute; right: 10px;" />
        </div>
      </div>

      <div class="divOrders">
        <div class="title">最新订单</div>
      </div>

      <div class="quitLogin">退出登录</div>
    </div>
  </div>
</template>

<script setup lang="ts" name="userIndex">
import { ArrowLeft, ArrowRight } from '@element-plus/icons-vue'
import { useRouter } from 'vue-router';
const router = useRouter()

const addressClick = () => {
  router.push({path: '/addressInfo'})
}
</script>

<style scoped lang="scss">
.userIndex {
  width: 100%;
  height: 100vh;
  background-color: #f3f2f7;

  .divHead {
    width: 100%;
    height: 25%;
    opacity: 1;
    background: #ffc200;
    box-sizing: border-box;
    padding-left: 3vw;
    padding-right: 3vw;

    .divTitle {
      // height: 50%;
      padding-top: 10%;
      display: flex;
      align-items: center;
      text-align: center;
      font-size: 20px;

      span {
        flex: 1;
      }
    }

    .divUser {
      display: flex;

      .desc {
        display: flex;
        flex-direction: column;
        justify-content: center;

        .divName {
          font-size: 18px;
          font-weight: 500;
          text-align: left;
          margin-bottom: 5px;
        }
      }
    }
  }

  .divContent {
    box-sizing: border-box;
    width: 100%;
    height: 75%;
    padding: 10px;

    .divLinks {
      width: 100%;
      height: 30%;
      background-color: #fff;

      .item {
        height: 50%;
        position: relative;
        display: flex;
        align-items: center;
        padding-left: 5%;
      }

      .divSplit {
        height: 2px;
        opacity: 1;
        background-color: #ebebeb;
        border: 0;
      }
    }

    .divOrders {
      width: 100%;
      height: 50%;
      margin-top: 15px;
      background-color: #fff;

      .title {
        height: 20%;
        display: flex;
        align-items: center;
        padding-left: 20px;
        opacity: 1;
        font-size: 20px;
        font-weight: 500;
        text-align: left;
        color: #333333;
        letter-spacing: 0;
        border-bottom: 2px solid #efefef;
      }
    }

    .quitLogin {
      height: 10%;
      display: flex;
      align-items: center;
      justify-content: center;
      opacity: 1;
      background: #fff;
      border-radius: 5px;
      opacity: 1;
      font-size: 20px;
      font-family: PingFangSC, PingFangSC-Regular;
      font-weight: 500;
      text-align: center;
      color: #333333;
      margin-top: 15px;
    }
  }
}
</style>